﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using AMatysiak.Methods;

namespace AMatysiakTest.Methods.DateExtensions
{
    [TestClass]
    public class ToTimeTest
    {
        [TestMethod]
        public void compareNow()
        {
            DateTime dt = DateTime.Now;
            string time = "{Hour:00}:{Minute:00}".FormatNamed(dt);

            Assert.AreEqual(time, dt.ToTime());
        }

        [TestMethod]
        public void compareWithDate()
        {
            DateTime dt = DateTime.Now;
            string datetime = dt.ToString();

            Assert.AreNotEqual(datetime, dt.ToTime());
        }
    }
}
